(find-log-file): Use source file's truename dir.
authorRichard M. Stallman <rms@gnu.org>
Fri, 28 May 1993 22:08:53 +0000 (22:08 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 28 May 1993 22:08:53 +0000 (22:08 +0000)
lisp/add-log.el

index 2c9170903d1a7d2a092288ba2360a423ddfee363..9b180566f70d8a787cbbeafa3f53265fc0d545cf 100644 (file)
@@ -54,6 +54,13 @@ Once a file is found, `change-log-default-name' is set locally in the
 current buffer to the complete file name."
   (or file-name
       (setq file-name (or change-log-default-name
+                         ;; Chase links in the source file
+                         ;; and use the change log in the dir where it points.
+                         (and buffer-file-name
+                              (let (temp (file buffer-file-name))
+                                (while (setq temp (file-symlink-p file))
+                                  (setq file temp))
+                                (file-name-directory file)))
                          default-directory)))
   (if (and (eq file-name change-log-default-name)
           (assq 'change-log-default-name (buffer-local-variables)))